<?php
if ($db = new SQLiteDatabase( 'InstantInput.db' )) 
{
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Users'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE Users');
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Classes'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec("DROP TABLE Classes");
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='User_Classes'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE User_Classes');
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Metrics'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE Metrics');
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Threads'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE Threads');
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Messages'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE Messages');
	}
	
	$result = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='Liked_Messages'");
	if ($result->numRows() > 0) 
	{
		$db->queryExec('DROP TABLE Liked_Messages');
	}
} 
else 
{
	die($err);
}
?>

Tables Dropped